import { SessionUtils } from '@/utils'
export const login = {
    namespaced: true,
    state: {
        userInfo: SessionUtils.get('userInfo') || {},
    },
    actions: {},
    mutations: {
        setUserInfo(state, payload) {
            state.userInfo = payload;
            SessionUtils.set('userInfo', state.userInfo)
        },
        
        removeUserInfo(state) {
            state.userInfo ={};
            SessionUtils.set('userInfo', {})
        },
        
    }
}